<template>
    <div>
<!--        在组件中，使用v-for循环的话，一定要使用 key-->
<!--        将来，谁使用此轮播图组件谁为我们传递 lunbotuList-->
        <mt-swipe :auto="2000">
            <mt-swipe-item v-for="item in lunbotuList" :key="item.id">
                <img :src="item.imgname" alt="" :class="{'full':isFull}">
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
    export default {
        name: "swiper.vue",
        props:["lunbotuList", "isFull"]
    }
</script>

<style scoped lang="scss">
    .mint-swipe {
        height: 300px;
        .mint-swipe-item{
            text-align: center;
            .full{
                width: 100%;
                height: 100%;
            }
            img{
                height: 100%;
                display: inline-block;
                max-width: 100%;
            }
        }
    }
</style>